Quite a few improvements

What I did:

1. Switched to `mocha` for the tests
2. Made sure that the function throws an error when an unknown format is given
3. Fixed handling of links inside parenthesis, e.g. `I looked at google (www.google.com)`
4. Allowed for a custom format function to be passed as the format argument. This allows the user to implement formats or manipulate the title before inserting it.
5. Fixed a bug in the binary and also made it accept `--help`
6. Added tests for all the new features

It's quite much but I have separated everything by commits quite good, I would suggest clicking thru them to get a better understanding of what I have changed.

Thanks!