Puigdemont frees former president of Catalonia, but must return to Sardinia on October 4