Auto add directories for rpm
#413 Fix name for directories and config files
#353 Remove trailing slash from prefix
Merge pull request #414 from r4um/auto_rpm_dirs

Fix #199 Auto add directories for rpm.