As pointed out by Joffrey Fitz, gsu-based scripts do not work when
run as a user without home directory. This happens for example if
the script is executed through a web application as the www-data user.
This patch replaces all references to HOME by ${HOME:-}, i.e. we just
default to the empty string but don't fail immediately.