Redmine#4761: Add masterdir+inputdir tagging tests.  Simplify and remove dead code.