Fix wrong function call, path.Base to path.Dir