Restructured the source directories.

* Moved all sources in a src/ folder.
* Moved Mac specific source files in src/mac/ folder.
* Overhauled the Makefile for Mac.