When finding real paths ignore directories

Fixes #3