Fixed python 3 permissions issue in a test