Fix adding to PATH

Test if the PATH variable exists before manipulating it.
Merge pull request #1 from umago/master

Fix adding to PATH