Create object directories

Also mark clean as phony target
FIx build warnings/errors, various 64bit problems
Merge pull request #1 from giannitedesco/build-fixes

Build fixes