Yet another attempt to get correct directory