Changing directory check to use a regex =~

In ubuntu, the command file -ib $file is returning
"inode/directory; charset=binary" instead of just "directory"
as it returns in OSX.

This change corrects that issue.
missing another == check