Fix and generalise make clean (#541)
Merge review 447 by @mlucy (Closes #541)