When you type adb shell what prompt do you get?
Here's my suggestion:
Open command window
Change your path to the correct directory on your PC
Connect tablet, with USB debugging enabled
Type adb devices
Verify communication by the response from adb
Type adb shell
Should return #
Type mkdir blah blah
Continue with the script
Or I could be wrong.