Cache dir path fix for Windows

What about returning here? And getting rid of ``$home`` variable and ``else``