test: use regex in doctest
test: support passing in an empty env
test: provide default shell for testfile()
Makefile: add scripts/cram to linters
Improve documentation of public functions