ghe-restore: check maintenance mode is enabled.

Do this instead of just enabling it unconditionally.

Fixes #62.

CC @rtomayko for review.