fixed bug in dicom.scan_dir