Fix a syntax error in init.read_snapshot

Add a unit test to ensure correct operation of read_snapshot in the
future.