fixed weirdness around file permissions