properly handle directories not ending in .sagenb
use endswith()
Merge pull request #138 from ppurka/dot_sagenb

properly handle directories not ending in .sagenb