Remove an extra is_directory call.

I checked that opening a directory on windows does fail, so this saves a "stat".