kompile should only create a directory if definition exists
Merge pull request #1008 from osa1/kompile-fix

kompile should only create a directory if definition exists