rewrite prep & cleanup functions

We used to rely on git to restore all the files to normal when we were
done, but that doesn't work if files aren't in the git history. So, now
we move them all into a tmp directory, copy out the ones that we
actually want to deploy (using our fancy new getFileList fn), commit, &
restore the files from the tmp dir. Doesn't rely on git at all and all
gitignored files are kept the same as they were before.