Migrate basedir script