Cleanup tmpdir after deployment finished

Also take into account that a deployment may have failed, so we 
need to clean-up in the 'after_run' handling.