Added a linked list implementation.
Added ERROR() and WARNING() for debugging.
Fix bug where we could run past the end of the friends list
Fix segfault when no broadcast device is found
Fix bug where file handle wasn't closed on success
Merge remote-tracking branch 'upstream/master'
Merge pull request #366 from nickodell/master

Misc bugfixes