ref #143 - error checking in temp file removal

check return value from call to unlink and warn if it fails - also
check the file exists before trying to remove it because it may not
exist in the first place