Fixed segfault in printList/deleteList.

printList/deleteList previously did not account for empty lists and
segfaulted when they encountered empty lists. Also added comments for
clarity.
Fixed trailing comma bug in printNode.

Fixed bug where printNode printed a comma before printing an
empty list node. printNode does not print anything for empty
list nodes, so the bug was effectively a trailing comma.
User can now specify file print destination
Error checked malloc, removed main, print chars

Program now dies if malloc returns NULL, main function removed,
printNode now accounts for printing chars.