Still untested.
* CheckDirExist now returns correctly if file is given
* Replaced dummy typedef with int parameter