Setting the last char of string to null.

Fixes #1
This is a stupid mistake made by me. Never forget to set the last char to NULL
in a string. Failure to do so will result in garbage values and SIEGSEGV.

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>