Fix linux version of out::open() and update CMakeLists.txt