Test if directory exists before pushd

I got an error here on Ubuntu 12.