added nstrncat function to concat n strings safely to one string