Fixed directory checking on windows
Use cmake to build the resulting project

Also fix the installation directory