fixed bug that was noticed by @gidden in which providing just the filename borked.