Null terminate strings

String were not NULL terminated, this fix seems to address the issue and eliminate actual problems found while trying to use libtoml for AppFlinger (http://www.appflinger.com/)