Fix bug 950

The getBasePath() was returning NullPointerException, because the method was trying to create a File using a null basePath. I changed the getBasePath method to return a String, create a getFileFromBasePath and where the old getBasePath was called, I changed it to getFileFromBasePath, verifying if basePath was null.