Braces should be used around all statements, even single statements
Cleanup: removed dead code
Added ajax support to `get_path_obj`

This somehow covers part of what `get_xhr_resource_context` did, and
supports arbitrary paths too.
Pass `dir_path` and `filename` as kwargs
Arbitrary path support for checks' and overview stats