Replace use of asprintf() with snprintf().

In this change I choose the lesser of the response length or 16 and add
the MIN() macro -- asprintf is not in the c99 standard and needs
-D_GNU_SOURCE or -D_BSD_SOURCE to prevent an implicit definition
warning.

This change also ensures against absurdly long output names
(should be almost always be shorter than 8 char).
Define TWOBWM_PATH if not defined to ensure always defined.