Build system fixes

Put version.h in build directory
Fixed out of source build not being completely out-of-source (version.h)