fix startup script and move build files to build directory