This will need to handle the case where the slave does not have the 'listdir' command.  As written, it will fail, which is not what we want.  It should probably just fall back to update if listdir isn't found.