fixes previously it was assumed that the index base dir existed. Not the complete path is created if necessary.