create missing target directory, recognize more patterns and unlink unused files