More portable setup with most config in ~/.profile.

Fixes link-dotfiles isse in Python 2. Move bash commands into script files.