add build script. Usage: build [output directory]