dirname('/test.txt') returns '\' on windows whereas on linux we get back '.'