Make createObjectFile's signature a bit less error prone.

This will be better with c++11, but right now file_magic converts to bool,
which makes the api really easy to misuse.