Added functions to read and process input URLs with wildcards.
Improved URL expansion algorithm.