generalize texdirname calls; ie no open/closed