Parse resource path for relativizing cache paths