edx_dl: Move import to the top of the file.

I don't really know why I put imports down below a lot of code.
Fix some PEP-8 space issues.
edx_dl: Some first steps towards Python 3 compatibility.

Since we claim to support Python 3 and we have it enabled in the continuous
integration parts, we fix it.
edx_dl: Change code from `if ... __main__` to a function called `main`.

This way, we can use relative imports which will help to use Python 3 *and*
we will also get rid of edx-dl being a symlink, which some operating systems
may not like.
Transform edx-dl into a proper script.

We also have to use a relative import here, or, otherwise, the script will
stop to running.