Expandurl is a project mainly written in Perl, it's free.
Expand shortened URLs via longurl.org.
expandurl is a Perl program that expands a shortend URL to its original length.
Copy the expandurl program to a directory of your choice.
You'll need the JSON::Any module installed, freely availible from the CPAN
./expandurl http://bit.ly/a7bxX5
expandurl expands URLs by utilizing the longurl.org API. longurl.org supports the expansion of the following services:
http://longurl.org/services