Missing sentry metadata.yaml

Write the metadata.yaml when the relation_sentry is created, rather than waiting until a relationship is added.

Trying to run an amulet test kept resulting in: http://paste.ubuntu.com/6587980/

The other error this fixes is the incorrect exception being caught for python3 subprocess.

The test takes a bit of time to run unfortunately (1sec). From a very brief look, it's mostly during the creation of the Builder(). We could avoid it by mocking the Builder and just asserting that write_metadata() is called. Let me know what you prefer.