Linux compatibility

The loop in removeLineFromFile for removing certain lines was breaking the .bashrc under Linux, therefore I replaced it with a sed command. 

Should be compatible with OS X as well, I could only test it with Ubuntu 12.10.