Don't free dirname() return value

See http://man7.org/linux/man-pages/man3/dirname.3.html