Fixes #58

Also adds a printlog function to makelibrary.pl.