fix 'empty basedir' problem in Windows;

see http://stackoverflow.com/a/7783326