Fixed building package if build directory is missing.