Fixing hardcoded home path

Changing the hardcoded /home path to the $HOME environment variable, as /home breaks on systems where /home/ is not the user's home directory and/or they do not have write permissions to that directory.