Use $HOME rather than /home/pi

Drops assumption that /home/pi is being used.