Exchange them for another currency (or denomination, if you want to and can) as soon as possible.
If somehow that didn't work, your only choice would be to physically send them to a friend in India. (If you have one you trust enough.) You could send it by mail or courier, using a tracking number. Your friend would then deposit them into their bank account. (And hopefully wire you something back :) ) Of course, this assumes the amount of money you have is actually significant enough for it to be worth the trouble.
The more time passes after this announcement, the less likely it will be that money changers are going to take them.
According to the announcements, Indians are being asked to deposit all these notes into their bank accounts (or change them, if it's a rather small amount) by December 31. The idea seems to be that people with a few thousand in honest cash can do this without issue, but someone with 10 million of black money can't.
The Indian Prime Minister said today:
"Black marketeers and traitors who use black money will not be able to
move large amounts of money and 500 and 1,000 rupee notes will become
worthless pieces of paper. Those citizens earning honestly and with
hard work, their interests will be protected.”
Modi emphasised that citizens who had 500 and 1,000 rupee notes need
not panic, as cash could be deposited at banks or post offices until
the end of 2016. He said: “These steps are a part of our battle
against corruption, black money and counterfeit notes. The ordinary
citizen who is struggling, will be strengthened … There is no need for
you to rush to the bank tomorrow, you have 50 days.”
The effect this will have in India is that as the days pass, fewer and fewer people will want these 500 and 1000 bills anymore. Everyone who has them (provided it's a reasonable amount that won't attract the attention of tax authorities or law enforcement) will go and deposit them in their bank accounts. As we approach December 31., businesses, etc. will start dealing in lower denominations and/or the new replacement notes.
Update, November 9th:
This is already happening. From my local supermarket today:
So, these old 500 and 1000 notes will get less and less popular as time passes, and eventually the only ones who will take them will be Indian banks. And after December 31, even the banks won't. The notes will then be mere pieces of paper.
It's a bit difficult to say how exactly this effect will play out with money changers abroad. But if you have a significant amount in Indian Rupees, I'd suggest you try and exchange it for another currency as soon as possible.
As @mts pointed out in a comment, the link from OP says:
People who possess Rs.500 or Rs. 1000 currency notes after December 30
can exchange it at Reserve Bank of India by providing a declaration.
This is till March 31, 2017.
This is useful, and will probably reduce the drasticness of the effect. Even if you're going to India before March 31, though, this sounds like a rather inconvenient thing to do. Also, I'm not sure whether or not people who are not Indian citizens will be able to do this. That's speculaion, though, but in any case, I wouldn't put my money on this (literally.) I would try to change the notes as soon as possible.