FIXED filepath problems, added DOCUMENT_ROOT absolute path detection

FIXED wrong file path problem. Added DOCUMENT_ROOT detection.
DB file not created automatically if needed.