cross platform fix for getting current directory