Goodbye redundant do{}s.
Simplify the test for base_dir() on psgi.
Merge pull request #34 from ytnobody/fix/base_dir_test

clever! - Some fixes for `test_dir()`