fix directory path appending / in local test mode