Simple utility function to append a string to a filename. Requires file name/path and string to be appended. Returns full path with new name.

UPDATED 2015-06-23: Justin pointed out a bug that would occur for paths that contained the filename. I’ve updated the function to handle those cases based on a suggestion from him.