fixed osx config/data dir being in the wrong place, closes #459.

Added migration module to contain any of those fixes that have to be performed
before startup.