Fixes #99, set cachedir in globalconfig