Fix created as per Issue 853.
Adjust fix to cope with non-root J installs
Merge pull request #854 from Sophist-UK/fix_list.php_for_ajax_filtering

Fix list.php for ajax filtering as per Issue 853.