movefile: simplify xattr fallback logic

The "with open()" construct handles exceptions just fine.
tests: add assertExists/assertNotExists helpers

This makes it easy to assert the state of paths and when things fail,
get a good error message in the process (without having to dig into
temp dirs by hand).

This has largely been cribbed from ChromiumOS's chromite module.