Make the pack function respect the buffer argument if passed

Fixed issues with passing an existing `Buffer` object to the pack function.

Now pack actually respects the buffer passed in and uses it instead of creating a new 1kb one.

`.pack` returns the offset of the end of the packed data when it is passed a buffer instead of the new buffer

Ran grunt which compiled the last PR (my bad :smile: )