add files (copied from pattern-match gem)