Better restriction check for generic types
Merge pull request #71 from prep/master

Add the Dir.exists? method