Fix thread test for IO#read

IO#read returns the Thread instance, so we can simply join the
thread to ensure it's execution before test completes