Clean and update build output more intelligently

Fixes #183.
please rename this var to "commonSourcePath" to match the new method name