fix Location
fix tempfile tests, including TODO for a test that should pass but doesn't due to END block issues