Security: Removed call to system() as it's buggy

Fixed up calling. Added error checking and now parses ini style
configuration files for the directory name