Simplified comments in test template.
Refactor to better support solaris 10.

Use more generic/portable implementations to avoid solaris
idiosyncracies.

Fixes #150