Fix for Travis Job#9.1 under 1.9.3
Fix URI casting and add spec