test/common.sh: new file for common utility functions for the test scripts.