Try this, i've posted it on other problems and it seems to have worked. I had the folder issues too.
in index.php for AJAX requests.
Comment out all the lines below
Code:
// check client X-header to verify request origin
if ($OUTPUT->ajax_call)
{
if (empty($CONFIG['devel_mode']) && !rc_request_header('X-RoundCube-Referer'))
{
header('HTTP/1.1 404 Not Found');
die("Invalid Request");
}
}