Experimental and ab initio study of the photofragmentation of DNA and RNA sugars