Fix NPE caused by empty directory

If the file is a directory and it is already empty, the list of files
will be null. Check for null in this case and don't attempt to delete
anything and instead only add it to the list of emptyDirs.
Merge pull request #12 from jle/fix_npe_delete_contents

Fix NPE caused by empty directory