Add .exists() check before isDirectory()

The IllegalArgumentException should only be thrown when the File
object exists but is not a directory type.
Merge pull request #13 from jle/add_check_exists_to_delete_contents

Add .exists() check before isDirectory()