Use `install` instead of `cp` and setup cleaner permissions on installed files

Should fix #1073