Add test for source maps.

Tweak behavior of post_build; the `post2` hook now expects a function.