Add pre-migrate hook

Also, rename hook variables to better describe their purpose.
Merge pull request #8 from jscheid/add-pre-migrate-hook

Add pre-migrate hook