Your script seems pretty close to the mark to me!
A couple minor notes:
It's best to avoid using 'ls' when you can just use globbing - it's faster and easier to read.
Also, you should always use quotes around filenames in case they have spaces in them.
You can check if a file is a directory with the if [ -d "$file" ] construct.
Working on the assumption that you want the .dump files in the /var/svn folder, here's what I came up with.
for file in "$directory"/*
if [ -d "$file" ]
svnadmin dump "$file" > "$file$extension"
Let me know if this works for you!