Fixed permissions issue when creating a new file. Fixed incorrect test output.