Fix non-capitalized part bug

Fix issue where if the final piece of the import string wasn't capitalized, only one string would appear in the final RST. Which is fine as far as Java is concerned, but the sphinx RST compiler isn't happy about it.

    ERROR: Error in "java:import" directive:
    2 argument(s) required, 1 supplied.

This change force appends the final piece as a class part.
Adjust cls_parts variable check

Change the if statement for an empty class parts variable so that it steals the last item from package_parts. This way, package + '.' + cls will still give the full import instead of duplicating the class.
Merge pull request #29 from andrewd18/master

Fix non-capitalized final part bug