Check first if system_dir and device_dir exists

Change the order of variable checking so it is clear whether
the system_dir or device_dir does not exist or a specific file
in the *_dir does not exist.

Test: build_mixed system_dir device_dir dist_dir
Merged-In: I0d61ea11c3bd22ef12eccbb46b8f665414188307
Change-Id: I0d61ea11c3bd22ef12eccbb46b8f665414188307
(cherry picked from commit 52edf8fb4f5eaa8f6c6c13a1a87a34311ccb76ed)
(cherry picked from commit f418b9b9e55fc1d4e658a2942ed7bb6ce1972836)
1 file changed