Use rsync in place of cp to avoid copying .git and .hg folders.
Use absolute path for bin dir.