livepatch-build-tools: fix misuse of script directory as work directory
It's incorrect to assume that the script directory will always match the
directory the script is executed from. Instead cache the directory at the
start of script execution in order to be able to get back to it if needed.