Trim query string from extension when downloading archives