Fix permissions and standardize path to Perl in scripts