fix problem with suffix when dir is not set



[Fixes #131]