Allow for optional renaming of the copied file

This comparison needs spaces to work:
`[ $name == "" ]` instead of `[ $name=="" ]`