Added fix for unix fomat of empty dirname (Windows is '.' Linux is '/')