Add default -d = dir of torrent to btcli add

This very minor change makes the -d dir flag optional for `btcli add', defaulting to the directory the torrent is located in, or "." if no directory can be found for the torrent. 

Uses dirname() from libgen.h.

I use this in conjunction with -T to emulate the default behaviour of most other torrent clients, such as rtorrent.