made .bash_profile multi-platform, added some robustification