Automatically fixes file permissions