Added umask, check paths are directories for stats.