Directory scanning implemented.

Only works for .jpg now. Will have to look into what the problem is
with GLOB_BRACE.