added methods addFolders, addExtensions and tests

This PR also fixes #14 and #13 created by myself.

Accidentally not sure whether I need to send 2 PR . If you feel it is good, will document the functionality added.