Fix "leaks" of geany_run_script (bug 975)

In build_run_cmd() the script was not deleted when any one of
several errors occurred.  The errors are not related to script
contents so it makes no sense to leave the script.

Also fixes failure to delete script if a working dir was set.