Tidy up Generate

Replace mount read-write followed by mount read-only with a single
mount read-only.

Use gerr for function errors and err for step errors.

Replace log with glog.

Add missing cleanup.