Added copy task to build script and fixed tests.