Fixed automatic URL detection.

Closes #8.