added automatic suffix support; apply_to directory agnostic