Properly close device after opening it to determine type

The prior code was unreachable due to the returns above it.
Merge pull request #36 from nickgarvey/master

Close ext fs after opening for determining type