properly handle directories not ending in .sagenb

Currently, supplying directory names without .sagenb extension results in a spectacular fail. This is a serious regression.