FIle (directory) test operator (bash)

I'm almost pulling out my hair trying to figure out what's wrong with this... there's no reason I can see that it shouldn't be working. It seems that the code acts as though the conditional statement is true no matter what - I've even tried removing the negation operator, but it always goes into the first block of code whether or not the directory exists. I've also tried switching -d to -e, but it gets the same result. Thanks in advance!

directory="Test"
echo "Does $directory exist in:"
pwd
if [[ ! -d "$directory" ]];
then
    mkdir $directory
    echo "$directory doesn't exist"
else
    echo "$directory exists."
fi

Output: (when the folder exists)

Does Test exist in:
/media/WALTER/autosync
mkdir: cannot create directory `Test': File exists
Test doesn't exist

Output: (when the folder doesn't exist)

Does Test exist in:
/media/WALTER/autosync
Test doesn't exist

Try

cd /media/WALTER/autosync
ls -l Test

"Test" is another type of file, like a text file for example.

works perfectly for me...

Ran it as a script...

#!/bin/bash

directory="Test"
echo "Does $directory exist in:"
pwd
if [[ ! -d "$directory" ]];
then
    mkdir $directory
    echo "$directory doesn't exist"
else
    echo "$directory exists."
fi

Output when running script:

user@aixdev20 $ chmod u+x test.bash
[/home/user]
user@aixdev20 $ ./test.bash
Does Test exist in:
/home/user
Test doesn't exist
[/home/user]
user@aixdev20 $ ./test.bash
Does Test exist in:
/home/user
Test exists.

Jim's answer makes sense, should have thought of that myself.

Just tried your code is a script (no header) and then run it using:

$ bash -x ./testscript

and it worked fine (in Ubuntu Linux).

[code]
/tmp$ bash -x ./testscript
+ directory=Test
+ echo 'Does Test exist in:'
Does Test exist in:
+ pwd
/tmp
+ [[ ! -d Test ]]
+ mkdir Test
+ echo 'Test doesn'\''t exist'
Test doesn't exist
/tmp$ bash -x ./testscript
+ directory=Test
+ echo 'Does Test exist in:'
Does Test exist in:
+ pwd
/tmp
+ [[ ! -d Test ]]
+ echo 'Test exists.'
Test exists.
/tmp$ rmdir Test
/tmp$ bash ./testscript
Does Test exist in:
/tmp
Test doesn't exist
tony@tony-laptop:/tmp$ bash ./testscript
Does Test exist in:
/tmp
Test exists.
/tmp $

[code]

Well, I removed the semi-colon after the conditional statement and now it works perfectly - thank you all for your help.