YARN-1395. Distributed shell application master launched with debug flag can hang waiting for external ls process. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1540839 13f79535-47bb-0310-9956-ffa450edef68