Fix exception handling in get_replication_snapshot

Unexpected errors that occur while generating the replication snapshot
(for example, TemplatesNotFound) are not logged. This can lead to
accidental hiding of the root cause of a problem.

All exceptions are now written to the log and then re-thrown.

Change-Id: I48de0e099494b204a8b109caedb4b86a616024f1
Closes-Bug: #1386875