Greenwood granted bail ahead of attempted rape trial