Converted os::ls to return a Try

Review: https://reviews.apache.org/r/20499
Fixes for stout ls returning Try.

Review: https://reviews.apache.org/r/20500
Fixed two flaky slave recovery tests.