BF: keep os module around for running get_info

We were getting ``os`` not defined errors when running ``make
check-version-info``.  This was because the module was deleting ``os``
before the lambda using ``os`` was used.  Use a function instead.
Merge pull request #150 from matthew-brett/make-check-version-fix

BF: keep os module around for running get_info