fixing broken hekad logic for configdir feature and modifying options to auto-detect config path based on file or directory name