Try to load parent directory if a resource is not found

The redirects acquire some smart logic to avoid blindly redirecting users
to the `/projects/<code>/` page if a language for a given project hasn't
been found.

In this case, if the project exists for the selected language but the
resource is not found, it will try load the closest parent directory,
ending up at the root level in the worst case.

Likewise, if the project doesn't exist for the selected language, the
language page will be displayed.

Fixes #106.