On windows, pathinfo seems to return " \ " as the dirname which causes the if statement to be true.. when it should not be, to ensure the correct behavior based on the existing tests.