This is safer and allows changing the shebang on existing files. It does require write access to the directory, but typically that's required for installing a file anyway.