Fix directory removal using VFS.rm() under OS X

The unlink() system call returns EPERM under OS X
if the path is a directory instead of EISDIR which
Linux returns in this case.