set BUILD_DIR to absolute dir
move build-perl into its own script