Fixes sending of Not Found responses; adds unit test for Not Found.