Added automatic plugin base directory and file detection.