Fix commands "cat" and "tail" throwing IOException and add tests for "cat"/"tail" not existing files