fix dirname call for server terrain worker