Added -x option to exclude directories from scan