Added CMake files.
Fixed scripts to work with the dash shell