Modified exception for dir.
Merge pull request #1 from qinutest/master

Modified exception for dir.