Check for null logger before trying to close it.

@timrae 

Should fix bug 2 from [Issue 2271](https://code.google.com/p/ankidroid/issues/detail?id=2271). First problem was passing the wrong path from the dialog, second problem was trying to close a logger that we never created.