Check for a file descriptor before trying to close it

This was causing a traceback for me:
```traceback
% inv --list
Traceback (most recent call last):
  File "/usr/local/bin/inv", line 9, in <module>
    load_entry_point('invoke==0.8.1', 'console_scripts', 'inv')()
  File "/usr/local/lib/python2.7/site-packages/invoke/cli.py", line 279, in main
    dispatch(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/invoke/cli.py", line 265, in dispatch
    args, collection, parser_contexts = parse(argv, version=version)
  File "/usr/local/lib/python2.7/site-packages/invoke/cli.py", line 188, in parse
    collection = loader.load(start) if start else loader.load()
  File "/usr/local/lib/python2.7/site-packages/invoke/loader.py", line 52, in load
    fd.close()
AttributeError: 'NoneType' object has no attribute 'close'
```