Add Wildcard search functionality.

Add wildcard search functionality on includes. Could probably be expanded to work on excludes.
Also, changed rewind function as that was breaking on windows 7 64bit for some reason (used for test). Works fine on Linux.