Updated pre-install to be more portable, and preserve symlink references