Refactor remote url retrieval files

Make available only one method to retrieve a web resource,
instead of one for parsing the html index and another one
for the mbox.

In addition, added magic numbers to detect the file type
by content, which is better than guessing by the subtype
given by the web server (not always available).