Fix build tests as well as other useful tests

This helped me investigating issue #131 and was currently broken.

This also fixes #152