kompile should only create a directory if definition exists

(Resolves #986 )

Note that this may not be flexible enough for new features. A more advanced implementation might provide an API to access to "-kompiled" directory and then generate the directory only when a request to put a file in that directory is happened. (e.g. we can create the directory lazily)

If you want I can also implement that.