Clean and update build output more intelligently

Fixes #183.
this won't need to be public anymore after making a special method just for the build folder