Fixed #1

The baseDir was set from an undefined variable which caused an error.