fixes #301 $remoteFilename not defined

This makes the self-update command to fail (not only on MAC as #301 mentions)