Automatically add "mainSourceFile" as a source file. Fixes #258.