Handle multiple GNUPLOT_LIB path and do not create it if it not exists.
Remove TM_GNUPLOT_TEMPLATEDIR variable
Bug fixes in error handling