Fixed some build issues.

Also now builds to a dedicated bin directory.
No longer allow builds in the source tree.