second attempt to make permission tests pass on travis too

by comparing original file permissions to generated file permissions (without hard-coding original permissions in test case)