Removed a few stray debug statements, added a read-only mode around directory handling/delete functions and allowed overriding of default time(NULL) function to fetch a unix timestamp, no dependence on Unix system calls now.