bash script problem

hi
I am writing a bash script that uses dialog to get user input an diplay messages to user. I have a small problem

dialog --inputbox "blabla" 20 50 2> /tmp/output
VAR="'cat /tmp/output'"
mkdir $VAR

the code below requests user for a directory path to be created.
But, if the user uses something like this
~/anydir
mkdir fails! "~ no such file or directory". In other words, if user uses ~/ instead of /home/username mkdir fails.
Can anyone help me?

Thanks...

Tilde expansion seems to have some oddities surrounding it. Not a satisfying answer, because it doesn't solve the real problem, but this seems to work:

#!/usr/bin/bash

if [ $(grep -c "^\~\/" /tmp/output) -eq 1 ]
then
   VAR=$(cat /tmp/output | sed -e's/\~//g')
   VAR=$(echo $HOME$VAR)
else
   VAR=$(cat /tmp/output)
fi

mkdir $VAR

Cheers,

Keith