Add support for bash-like globs through 'extended' flag

I found this useful while doing some completely unrelated JavaScript work, and ended up needing more extensive globbing support.