Updated cmake to use build and bin directories, and added Debug and Release modes