Canonical classes on singular varieties