Changed the order of detecting whether the archive is in .rar format.

Detecting whether the archive is in .rar format currently requires reading entire archive byte by byte 
which is very slow when the archive is big and as it's done before checking for .tar and .7z formats, so the opening of archive is very slow even for those formats.

Because of this I have reordered the checks, so that detecting if this is RAR archive is done last, so that .tar and .7z formats can be loaded fast and entire archive checking will only occur when the archive is in unsupported format.

I'm not sure whether the checking of entire archive is required for RAR format, so I didn't touch it.