added repository to package.json
switched name and directory in package constructor
added option to specify pattern