prepare.sh: make sure user umask does not affect deployment

Set a default umask of 022, so newly created files and directories
don't have very strict permissions.

Use install, rather than cp, to copy init scripts, so the permissions
are not preserved.