added method isInPath(), fixed dirname() on Windows