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.