Corrected file sorting mechanism

Files are now sorted by file name ascending by default. Case-insensitive comparison is now performed when sorting by file name or extension. When switching sorting fields ascending sorting will be used, otherwise sorting method will be toggled.
Fixed base URL calculation algorithm when HTTPS protocol is used