$dir, not $directory (!)