Update rlw.sh

fixed EOF and improved url parsing