tmpfiles: support 'with' statement

add __enter__ and __exit__ to support 'with' statements