make sure the gemdir is always present

I don't like the code but only small change I can do now.