adb: extract Windows bits out of directory_exists test. am: 89b9767776
am: e1dfdec612

Change-Id: Iabbfb82c5ab9f2327fc78516b97a04422628d99a