added string clone and search, finished io reader

Added string cloning for possibly null inputs. Added function for substring
searching. Completed missing pieces of the IO reader.