samples/ed.py: handle special case appending in empty file
also add test_ed_small.py to samples/README.md