updated $dir to be $searchdir which is more descriptive of what it does.

Signed-off-by: edge226 <lucid@celps.org>