Return 404 when schedule or job is not found when listing metadata

Fixes issue 222