Fix setting file permissions operation, creating the file if it doesn't exist