Defensive programming

The parent file of a parent file may be null. While at it, use the other
File constructor instead of using File.separator directly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>